using WXWorkSvc.Models;

namespace WXWorkSvc.Pages.Suite;

public class AuthCallbackModel : PageModel
{
    [BindProperty(SupportsGet = true)]
    public string SuiteId { get; set; } = default!;
    public async Task<IActionResult> OnGet([FromServices] WXWork3rd wx, string auth_code)
    {
        return Redirect(await wx.CreateAuthAsync(SuiteId, auth_code));
    }
}
